package cn.sun.controller;

import cn.sun.domain.Order;
import cn.sun.service.IOrderService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order")
@RequiredArgsConstructor
public class OrderController {
    private final IOrderService orderService;

    @GetMapping("save")
    public Order save(Long pid,Long uid){
        return orderService.createOrder(pid, uid);
    }
}
